﻿using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CubicFWNet.Data.Models.Mapping
{
    public class CollectAndPayMentMap : EntityTypeConfiguration<CollectAndPayMent>
    {
        public CollectAndPayMentMap()
        {
            // Primary Key
            this.HasKey(t => t.Id);

            // Properties
            this.Property(t => t.Number)
                .HasMaxLength(64);

            this.Property(t => t.CreatorName)
                .HasMaxLength(64);

            this.Property(t => t.Memo)
                .HasMaxLength(256);


            this.ToTable("CollectAndPayMent");
            this.Property(t => t.Id).HasColumnName("Id");
            this.Property(t => t.Type).HasColumnName("Type");
            this.Property(t => t.Status).HasColumnName("Status");
            this.Property(t => t.Number).HasColumnName("Number");
            this.Property(t => t.OrderId).HasColumnName("OrderId");
            this.Property(t => t.InvoicId).HasColumnName("InvoicId");
            this.Property(t => t.Amount).HasColumnName("Amount");
            this.Property(t => t.CreatorId).HasColumnName("CreatorId");
            this.Property(t => t.CreatorName).HasColumnName("CreatorName");
            this.Property(t => t.CreateTime).HasColumnName("CreateTime");
            this.Property(t => t.Memo).HasColumnName("Memo");
        }
    }
}
